/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cput.tp.patterns.behaviour.mediatorpattern;

/**
 *
 * @author Malotana
 */
public class AmericanSeller {
    
    Mediator mediator = null;
    float priceInDollar;
    
    public AmericanSeller(Mediator mediator, float priceInDollar){
        this.mediator = mediator;
        this.priceInDollar = priceInDollar;
        this.mediator.registerAmericanSeller(this);
    }
    
    public boolean isBidAccepted(float bidInDollars){
        if(bidInDollars >= priceInDollar ){
            System.out.println("Seller rejects the bid of " + bidInDollars +" dollars\n");
            return true;
        }else {
            System.out.println("Seller rejects the bid of " + bidInDollars +" dollars\n");
            return false;
        }
    }
}